/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package config.Models;

import config.ConfigMacros;
import java.util.HashMap;
import java.util.Map;
import libCore.Util;

/**
 *
 * @author LinhTA
 */
public class Conf_Cote {
     
    public Require require;
    public int food;
    public int maxPeg;
    public float timePercent;
    
    public Conf_Cote ( Map<String,Object> obj )
    {
        
        Map<String, Object> req = Util.obj2Map( obj.get(ConfigMacros.COTE_REQUIRE));
        require = new Require(req);
        
        food = Integer.parseInt(obj.get(ConfigMacros.COTE_FOOD).toString());
        timePercent = Float.parseFloat(obj.get(ConfigMacros.COTE_TIMEPERCENT).toString());
        maxPeg = Integer.parseInt(obj.get(ConfigMacros.COTE_MAXPEG).toString());
    }
}
